<template>
	<view>
		<view
		:style="{ height: `${ statusbarHeight }px`, paddingTop: '70rpx' }" 
		class="bg-white"
		:class="Theme"
		></view>
		<view 
		:style="{ height: `${ statusbarHeight }px`}" 
		class="fixed-top bg-white"
		:class="Theme"
		></view>
		<view 
		class="flex align-center position-fixed w-100 bg-white" 
		:class="Theme"
		:style="{ height: '70rpx', top: `${ statusbarHeight }px`, zIndex: 999 }"
		>
			<!-- tap事件不知道为什么放在自定义组件上不管用 -->
			<my-icon iconId="icon-jiantou-copy" class="mx-2" @click.native="quit" />
			<view class="font-lg">
				<slot></slot>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"pageTitle",
		data() {
			return {
				statusbarHeight: this.$statusbarHeight,
			};
		},
		props:{
			Theme:{
				type: String,
				default: 'bg-white'
			}
		},
		methods:{
			quit(){
				console.log('进入返回页面');
				// 返回上一页
				uni.navigateBack({
					delta: 1
				})
			}
		}
	}
</script>

<style>

</style>
